# Maintainer: Thomas Liske <thomas@fiasko-nw.net>
pkgname=ifstate
pkgver=0.9.0
pkgrel=0
pkgdesc="Manage host interface settings in a declarative manner"
url="https://liske.github.io/ifstate/"
arch="noarch"
license="GPL-3.0-or-later"
depends="iproute2 py3-pyroute2 py3-yaml py3-jsonschema"
makedepends="py3-setuptools"
options="!check" # no tests available
source="https://files.pythonhosted.org/packages/source/i/ifstate/ifstate-$pkgver.tar.gz
	ifstate.initd
	"
subpackages="$pkgname-openrc"

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
	install -Dm755 "$srcdir"/ifstate.initd "$pkgdir"/etc/init.d/ifstate
}

sha512sums="53d9d93a4a9f7e65bee1ca006977aefab6a04431cb0bce1a63b9640815444105d69fdf474b83e836303cebadd41a343b5d8fb734ead7c4d874546b1afa12699a  ifstate-0.9.0.tar.gz
e583c764c65dbf00ce6a4269cef5d8a78c2ec47851671cc25bbebd2d6095c42f0a10eccfd021728e05b3b67d8b950f9e4359da63226da551b8dc5ebd5d8aa0ef  ifstate.initd"
